﻿package app.controller {
    
	import app.model.types.LangTypes;
	import app.model.types.SectionType;
	import app.model.vo.SectionVO;
    import flash.display.DisplayObject;
    
    import org.puremvc.interfaces.*;
    import org.puremvc.patterns.command.*;
    import org.puremvc.patterns.observer.*;
    
    import app.model.*;
    import app.view.ApplicationMediator;
    import app.ApplicationFacade;

    /**
     * Create and register proxies and mediators
     */
    public class ChangeSectionCommand extends SimpleCommand
    {
        override public function execute( note:INotification ) :void    
        {
			//trace('ChangeSectionCommand');
			var sectionVO:SectionVO = SectionVO(note.getBody());
			sectionVO.lang = state.lang;
			sectionVO.data = remote.getSectionContent(sectionVO.id, sectionVO.lang);
			state.currentSection = sectionVO;
		};
    };
};